package com.huey.utils.annotation.filed;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;



/**
 * @author xubo
 * @date 2022/7/12 14:50
 */
@Data
public class User {
    /**主键*/
    private Long id;
    /**姓名*/
    @NotBlank(message = "名称不能为空")
    private String name;
    /**性别*/
    @CheckField(fieldValues = {"男", "女"})
    private String sex;
    /**年龄*/
    @Range(min = 20 , max = 99)
    private Short age;
    /**详细地址*/
    private String address;
}
